<!--{template common/header}-->
<!--{if in_array($do, array('buy', 'exit'))}-->
	<div class="f_c">
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]"><!--{if $join}-->{lang memcp_usergroups_joinbuy}<!--{else}-->{lang memcp_usergroups_exit}<!--{/if}--></em>
		<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
	</h3>
	<form id="buygroupform_{$groupid}" name="buygroupform_{$groupid}" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=usergroup&do=buy&groupid=$groupid"{if !empty($_G['gp_inajax'])} onsubmit="ajaxpost('buygroupform_{$groupid}', 'return_$_G['gp_handlekey']', 'return_$_G['gp_handlekey']', 'onerror');return false;"{/if}>
		<input type="hidden" name="referer" value="$_G[referer]" />
		<input type="hidden" name="buysubmit" value="true" />
		<input type="hidden" name="tab" value="$_G[gp_tab]" />
		<input type="hidden" name="perms" value="$_G[gp_perms]" />
		
		<!--{if $_G[inajax]}--><input type="hidden" name="handlekey" value="$_G[gp_handlekey]" /><!--{/if}-->
		<input type="hidden" name="formhash" value="{FORMHASH}" />
		<div class="c">
			<table class="list" cellspacing="0" cellpadding="0" style="width:300px">
				<tr>
					<td>{lang memcp_usergroups_title}</td><td>$group[grouptitle]</td>
				</tr>
			<!--{if $join}-->
				<!--{if $group['dailyprice']}-->					
					<tr>
						<td>{lang memcp_usergroups_dailyprice}</td><td>{$extcredits[$creditstrans][title]} $group[dailyprice] {$extcredits[$creditstrans][unit]}</td>
					</tr>
					<tr>
						<td>{lang memcp_usergroups_credit}</td><td>$usermaxdays {lang days}</td>
					</tr>
					<tr>
						<td>{lang memcp_usergroups_span}</td><td><input type="text" size="5" name="days" value="$group[minspan]" class="txt" style="width: 50px;" /> {lang days}</td>
					</tr>
					<tr>
						<td colspan="2">{lang memcp_usergroups_explain}:
							<!--{if $join}-->
								{lang memcp_usergroups_join_comment}
							<!--{else}-->
								{lang memcp_usergroups_exit_comment}
							<!--{/if}-->
						</td>
					</tr>
				<!--{else}-->
					<tr>
						<td colspan="2">{lang memcp_usergroups_explain}: {lang memcp_usergroups_free_comment}</td>
					</tr>
				<!--{/if}-->
			<!--{else}-->
				<tr>
					<td colspan="2">{lang memcp_usergroups_explain}:
					<!--{if $group[type] != 'special' || $group[system]=='private'}-->
						{lang memcp_usergroups_admin_exit_comment}
					<!--{elseif $group['dailyprice']}-->
						{lang memcp_usergroups_exit_comment}
					<!--{else}-->
						{lang memcp_usergroups_open_exit_comment}
					<!--{/if}-->
					</td>
				</tr>
			<!--{/if}-->
			</table>
		</div>
		<p class="o pns">
			<button type="submit" name="editsubmit_btn" id="editsubmit_btn" value="true" class="pn pnc"><strong>{lang submit}</strong></button>
		</p>
	</form>
	</div>

<!--{elseif $do == 'switch'}-->
	<div class="f_c">
	<h3 class="flb">
		<em id="return_$_G[gp_handlekey]">{lang memcp_usergroups_set_main}</em>
		<!--{if $_G[inajax]}--><span><a href="javascript:;" onclick="hideWindow('$_G[gp_handlekey]');" class="flbc" title="{lang close}">{lang close}</a></span><!--{/if}-->
	</h3>
	<form id="switchgroupform_{$groupid}" name="switchgroupform_{$groupid}" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=usergroup&do=switch&groupid=$groupid"{if !empty($_G['gp_inajax'])} onsubmit="ajaxpost('switchgroupform_{$groupid}', 'return_$_G['gp_handlekey']', 'return_$_G['gp_handlekey']', 'onerror');return false;"{/if}>
		<input type="hidden" name="referer" value="$_G[referer]" />
		<input type="hidden" name="groupsubmit" value="true" />
		<input type="hidden" name="tab" value="$_G[gp_tab]" />
		<input type="hidden" name="perms" value="$_G[gp_perms]" />
		
		<!--{if $_G[inajax]}--><input type="hidden" name="handlekey" value="$_G[gp_handlekey]" /><!--{/if}-->
		<input type="hidden" name="formhash" value="{FORMHASH}" />
		<div class="c">
			<table class="list" cellspacing="0" cellpadding="0" style="width:300px">
				<tr>
					<td>{lang memcp_usergroups_main_old}</td><td>$_G[group][grouptitle]</td>
				</tr>
				<tr>
					<td>{lang memcp_usergroups_main_new}</td><td>$group[grouptitle]</td>
				</tr>
				<tr>
					<td colspan="2">
						{lang memcp_usergroups_explain}: {lang memcp_usergroups_main_comment}
					</td>
				</tr>
				<!--{if !$group[allowmultigroups]}-->
					<tr>
						<td colspan="2">
							{lang memcp_usergroups_alert}:{lang memcp_usergroups_main_alert}
						</td>
					</tr>
				<!--{/if}-->
			</table>
		</div>
		<p class="o pns">
			<button type="submit" name="editsubmit_btn" id="editsubmit_btn" value="true" class="pn pnc"><strong>{lang submit}</strong></button>
		</p>
	</form>
	</div>
<!--{else}-->
	<!--{template home/spacecp_header}-->
			<!--{template home/spacecp_credit_header}-->
			<!--{eval 
				$permtype = array(0 => '{lang permission_menu_normaloptions}', 1 => '{lang permission_menu_forumoptions}', 2 => '{lang permission_modoptions_name}');
			}-->
			<div class="tdats">
				<table cellpadding="0" cellspacing="0" class="tdat">
					<tr>
						<th class="c0">&nbsp;</th>
					</tr>
					<tr class="alt">
						<th>
							<select name="perms" onchange="showPerm(this.value);">
								<!--{loop $permtype $key $value}-->
								<option value="$key"{if $_G[gp_ptype]==$key} selected="selected"{/if}>$value</option>
								<!--{/loop}-->
							</select>
							<script type="text/javascript">
								function showPerm(type) {
									window.location.href = 'home.php?mod=spacecp&ac=credit&op=usergroup&ptype='+type;
								}
								function showForumPerm(fid) {
									window.location.href = 'home.php?mod=spacecp&ac=credit&op=usergroup&ptype=$_G[gp_ptype]&fid='+fid;
								}
							</script>
						</th>
					</tr>
					<tr>
						<th>$forumselect</th>
					</tr>
					<!--{if $ptype==1}-->
						<tr class="alt h">
							<th><a href="javascript:;" class="oa" onclick="toggleTbody('ca');toggleTitle(this);">{lang permission_menu_forumoptions}</a></th>
						</tr>
						<tbody class="ca">
							<!--{loop $perms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>$permlang['perms_'.$perm]</td>
							</tr>
							<!--{/loop}-->
						</tbody>
					<!--{elseif $ptype==2}-->
						<tr class="alt h">
							<th><a href="javascript:;" class="oa" onclick="toggleTbody('ca');toggleTitle(this);">{lang permission_menu_modoptions}</a></th>
						</tr>
						<tbody class="ca">
							<!--{loop $aperms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>$permlang['perms_'.$perm]</td>
							</tr>
							<!--{/loop}-->
						</tbody>
					<!--{else}-->
						<tr class="alt h">
							<th><a href="javascript:;" class="oa" onclick="toggleTbody('ca');toggleTitle(this);">{lang permission_menu_basic}</a></th>
						</tr>
						<tbody class="ca">
							<!--{loop $bperms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>$permlang['perms_'.$perm]</td>
							</tr>
							<!--{/loop}-->
						</tbody>
	
						<tr class="alt h">
							<th><a href="javascript:;" class="oa" onclick="toggleTbody('cb');toggleTitle(this);">{lang permission_menu_post}</a></th>
						</tr>
						<tbody class="cb">
							<!--{loop $pperms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>$permlang['perms_'.$perm]</td>
							</tr>
							<!--{/loop}-->
						</tbody>
						<tr class="alt h">
							<th><a href="javascript:;" class="oa" onclick="toggleTbody('cc');toggleTitle(this);">{lang about_space}</a></th>
						</tr>
						<tbody class="cc">
							<!--{loop $sperms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>$permlang['perms_'.$perm]</td>
							</tr>
							<!--{/loop}-->
						</tbody>

						
						<tr class="alt h">
							<th><a href="javascript:;" class="oa" onclick="toggleTbody('cd');toggleTitle(this);">{lang permission_menu_attachment}</a></th>
						</tr>
						<tbody class="cd">
							<!--{loop $aperms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>$permlang['perms_'.$perm]</td>
							</tr>
							<!--{/loop}-->
						</tbody>
					<!--{/if}-->
				</table>
				<table cellpadding="0" cellspacing="0" class="tdat tfx">
					<tr>
						<th class="c0"><h4>{lang my_main_usergroup}</h4></th>
					</tr>
					<tr class="alt">
						<th>$maingroup[grouptitle]</th>
					</tr>
					<tr>
						<th>&nbsp;</th>
					</tr>
					<!--{if $ptype==1}-->
						<tr class="alt h">
							<th>$maingroup[grouptitle]</th>
						</tr>
						<tbody class="ca">
							<!--{loop $perms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td><!--{if $forumperm[$maingroup[groupid]][$perm]}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}--></td>
							</tr>
							<!--{/loop}-->
						</tbody>
					<!--{elseif $ptype==2}-->
						<tr class="alt h">
							<th>$maingroup[grouptitle]</th>
						</tr>
						<tbody class="ca">
							<!--{loop $aperms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>
									<!--{if in_array($perm, array('allowstickthread', 'allowdigestthread'))}-->
										<!--{if $maingroup[allowstickthread]==1}-->
											$permlang['perms_'.$perm.'_value'] I
										<!--{elseif $maingroup[allowstickthread]==2}-->
											$permlang['perms_'.$perm.'_value'] II
										<!--{elseif $maingroup[allowstickthread]==3}-->
											$permlang['perms_'.$perm.'_value'] III
										<!--{else}-->
											<img src="{IMGDIR}/data_invalid.gif" />
										<!--{/if}-->
									<!--{else}-->
										<!--{if $maingroup[$perm] == 1}--><img src="{IMGDIR}/data_valid.gif" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" /><!--{/if}-->
									<!--{/if}-->
								</td>
							</tr>
							<!--{/loop}-->
						</tbody>
					<!--{else}-->
						<tr class="alt h">
							<th>$maingroup[grouptitle]</th>
						</tr>
						<tbody class="ca">
							<!--{loop $bperms $key $groupbperm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>
									<!--{if $groupbperm == 'creditshigher' || $groupbperm == 'readaccess' || $groupbperm == 'maxpmnum'}-->
									$maingroup[$groupbperm]
									<!--{elseif $groupbperm == 'allowsearch'}-->
										<!--{if $maingroup['allowsearch'] == '0'}-->{lang permission_basic_disable_sarch}<!--{elseif $maingroup['allowsearch'] == '1'}-->{lang permission_basic_search_title}<!--{else}-->{lang permission_basic_search_content}<!--{/if}-->
									<!--{else}-->
										<!--{if $maingroup[$groupbperm] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
									<!--{/if}-->
								</td>
							</tr>
							<!--{/loop}-->
						</tbody>

						<tr class="alt h">
							<th>$maingroup[grouptitle]</th>
						</tr>
						<tbody class="cb">
							<!--{loop $pperms $key $grouppperm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>
									<!--{if $grouppperm == 'maxsigsize' || $grouppperm == 'maxbiosize'}-->
										$maingroup[$grouppperm] {lang bytes}
									<!--{elseif $grouppperm == 'allowrecommend'}-->
										<!--{if $maingroup[allowrecommend] > 0}-->+$maingroup[allowrecommend]<!--{else}--><img src="{IMGDIR}/data_invalid.gif" /><!--{/if}-->
									<!--{else}-->
										<!--{if $maingroup[$grouppperm] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
									<!--{/if}-->
								</td>
							</tr>
							<!--{/loop}-->
						</tbody>
						<tr class="alt h">
							<th>$maingroup[grouptitle]</th>
						</tr>
						<tbody class="cc">
							<!--{loop $sperms $key $perm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td><!--{if $maingroup[$perm] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}--></td>
							</tr>
							<!--{/loop}-->
						</tbody>

						<tr class="alt h">
							<th>$maingroup[grouptitle]</th>
						</tr>
						<tbody class="cd">
							<!--{loop $aperms $key $groupaperm}-->
							<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
								<td>
									<!--{if in_array($groupaperm, array('maxspacesize', 'maxattachsize', 'maxsizeperday', 'maxattachnum'))}-->
										<!--{if $maingroup[$groupaperm]}-->$allperms[$groupaperm][$maingroup[groupid]]<!--{else}-->{lang permission_attachment_nopermission}<!--{/if}-->
									<!--{elseif $groupaperm == 'attachextensions'}-->
										<!--{if $maingroup[allowpostattach] == 1}--><!--{if $maingroup[attachextensions]}--><p class="nwp" title="$maingroup[attachextensions]">$maingroup[attachextensions]</p><!--{else}-->{lang permission_attachment_nopermission}<!--{/if}--><!--{else}--><img src="{IMGDIR}/data_invalid.gif" /><!--{/if}-->
									<!--{else}-->
										<!--{if $maingroup[$groupaperm] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
									<!--{/if}-->
								</td>
							</tr>
							<!--{/loop}-->
						</tbody>
					<!--{/if}-->
				</table>
				<ul id="tba" class="tb c1">
					<li id="c1">{lang permission_member_group}</li>
					<li id="c2">{lang permission_special_group}</li>
					<li id="c3">{lang permission_specialadmin_group}</li>
					<li id="c4">{lang permission_system_group}</li>
				</ul>
				<div class="tscr">
					<!--{loop $grouplist $type $groups}-->
					<!--{eval $cid = $type == 'member'?'c1':($type=='special'?'c2':($type=='specialadmin'?'c3':($type=='system'?'c4':'')))}-->
					<table id="$type" cellpadding="0" cellspacing="0" class="tdat $cid" {if $_G[gp_perms] != $type}style="display: none;"{/if}>
						<tr class="alt">
						<!--{loop $groups $gid $group}-->
							<th>$group[grouptitle]</th>
						<!--{/loop}-->
						</tr>
						<tr>
						<!--{loop $groups $gid $group}-->
							<th class="pns">
								<!--{if $gid == $maingroup[groupid]}-->
									<img src="{IMGDIR}/data_valid.gif" />
								<!--{/if}-->
								<!--{if isset($publicgroup[$gid]) && $gid != $_G['groupid'] && $publicgroup[$gid]['allowsetmain']}-->
									<a href="home.php?mod=spacecp&ac=credit&op=usergroup&do=switch&groupid=$gid&tab=$cid&perms=$type&handlekey=switchgrouphk_{$gid}" id="setmaingroup_$gid" onclick="showWindow(this.id, this.href, 'get', 0);">{lang memcp_usergroups_set_main}</a>
								<!--{/if}-->
								<!--{if in_array($gid, $extgroupids) && $switchmaingroup && $type == 'special' && $gid != $_G['groupid']}-->
									<a href="home.php?mod=spacecp&ac=credit&op=usergroup&do=exit&groupid=$gid&tab=$cid&perms=$type&handlekey=exitgrouphk_{$gid}" id="group_$gid" onclick="showWindow(this.id, this.href, 'get', 0);">{lang memcp_usergroups_exit}</a>
								<!--{/if}-->
								<!--{if $type=='special' && $gid != $_G['groupid'] && array_key_exists($gid, $publicgroup) && !$publicgroup[$gid]['allowsetmain']}-->
									<a href="home.php?mod=spacecp&ac=credit&op=usergroup&do=buy&groupid=$gid&tab=$cid&perms=$type&handlekey=buygrouphk_{$gid}" id="group_$gid" onclick="showWindow(this.id, this.href, 'get', 0);">{lang memcp_usergroups_buy}</a>
								<!--{/if}-->
								<!--{if array_key_exists($gid, $groupterms['ext'])}-->
									<br /><span title="{lang memcp_usergroups_timelimit}">{date($groupterms[ext][$gid])}</span>
								<!--{/if}-->
							</th>
						<!--{/loop}-->
						</tr>

						<!--{if $ptype==1}-->
							<tr class="alt h">
								<!--{loop $groups $gid $group}-->
									<th>$group[grouptitle]</th>
								<!--{/loop}-->
							</tr>
							<tbody class="ca">
								<!--{loop $perms $key $perm}-->
								<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
									<!--{loop $groups $gid $group}-->
									<td><!--{if $forumperm[$gid][$perm]}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}--></td>
									<!--{/loop}-->
								</tr>
								<!--{/loop}-->
							</tbody>
						<!--{elseif $ptype==2}-->
							<tr class="alt h">
								<!--{loop $groups $gid $group}-->
									<th>$group[grouptitle]</th>
								<!--{/loop}-->
							</tr>
							<tbody class="ca">
								<!--{loop $aperms $key $perm}-->
								<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
									<!--{loop $groups $gid $group}-->
									<td>
										<!--{if in_array($perm, array('allowstickthread', 'allowdigestthread'))}-->
											<!--{if $group[allowstickthread]==1}-->
												$permlang['perms_'.$perm.'_value'] I
											<!--{elseif $group[allowstickthread]==2}-->
												$permlang['perms_'.$perm.'_value'] II
											<!--{elseif $group[allowstickthread]==3}-->
												$permlang['perms_'.$perm.'_value'] III
											<!--{else}-->
												<img src="{IMGDIR}/data_invalid.gif" />
											<!--{/if}-->
										<!--{else}-->
											<!--{if $group[$perm] == 1}--><img src="{IMGDIR}/data_valid.gif" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" /><!--{/if}-->
										<!--{/if}-->
									</td>
									<!--{/loop}-->
								</tr>
								<!--{/loop}-->
							</tbody>
						<!--{else}-->

							<tr class="alt h">
							<!--{loop $groups $gid $group}-->
								<th>$group[grouptitle]</th>
							<!--{/loop}-->
							</tr>

							<tbody class="ca">
								<!--{loop $bperms $key $groupbperm}-->
								<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
									<!--{loop $groups $gid $group}-->
									<td>
										<!--{if $groupbperm == 'creditshigher' || $groupbperm == 'readaccess' || $groupbperm == 'maxpmnum'}-->
										$group[$groupbperm]
										<!--{elseif $groupbperm == 'allowsearch'}-->
											<!--{if $allperms[$groupbperm][$gid] == '0'}-->{lang permission_basic_disable_sarch}<!--{elseif $allperms[$groupbperm][$gid] == '1'}-->{lang permission_basic_search_title}<!--{else}-->{lang permission_basic_search_content}<!--{/if}-->
										<!--{else}-->
											<!--{if $allperms[$groupbperm][$gid] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
										<!--{/if}-->
									</td>
									<!--{/loop}-->
								</tr>
								<!--{/loop}-->
							</tbody>

							<tr class="alt h">
								<!--{loop $groups $gid $group}-->
									<th>$group[grouptitle]</th>
								<!--{/loop}-->
							</tr>
							<tbody class="cb">
								<!--{loop $pperms $key $grouppperm}-->
								<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
									<!--{loop $groups $gid $group}-->
									<td>
										<!--{if $grouppperm == 'maxsigsize' || $grouppperm == 'maxbiosize'}-->
											$group[$grouppperm] {lang bytes}
										<!--{elseif $grouppperm == 'allowrecommend'}-->
											<!--{if $allperms[$grouppperm][$gid] > 0}-->+$group[allowrecommend]<!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
										<!--{else}-->
											<!--{if $allperms[$grouppperm][$gid] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
										<!--{/if}-->
									</td>
									<!--{/loop}-->
								</tr>
								<!--{/loop}-->
							</tbody>

							<tr class="alt h">
								<!--{loop $groups $gid $group}-->
									<th>$group[grouptitle]</th>
								<!--{/loop}-->
							</tr>
							<tbody class="cc">
								<!--{loop $sperms $key $perm}-->
								<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
									<!--{loop $groups $gid $group}-->
									<td><!--{if $allperms[$perm][$gid] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}--></td>
									<!--{/loop}-->
								</tr>
								<!--{/loop}-->
							</tbody>

							<tr class="alt h">
								<!--{loop $groups $gid $group}-->
									<th>$group[grouptitle]</th>
								<!--{/loop}-->
							</tr>
							<tbody class="cd">
								<!--{loop $aperms $key $groupaperm}-->
								<tr {if $key!=0&&($key+1)%2==0}class="alt"{/if}>
									<!--{loop $groups $gid $group}-->
									<td>
										<!--{if in_array($groupaperm, array('maxspacesize', 'maxattachsize', 'maxsizeperday', 'maxattachnum'))}-->
											<!--{if $group[$groupaperm]}-->$allperms[$groupaperm][$gid]<!--{else}-->{lang permission_attachment_nopermission}<!--{/if}-->
										<!--{elseif $groupaperm == 'attachextensions'}-->
											<!--{if $allperms[allowpostattach][$gid] == 1}--><!--{if $group[attachextensions]}--><p class="nwp" title="$group[attachextensions]">$group[attachextensions]</p><!--{else}-->{lang permission_attachment_nopermission}<!--{/if}--><!--{else}--><img src="{IMGDIR}/data_invalid.gif" /><!--{/if}-->
										<!--{else}-->
											<!--{if $allperms[$groupaperm][$gid] == 1}--><img src="{IMGDIR}/data_valid.gif" alt="data_valid" /><!--{else}--><img src="{IMGDIR}/data_invalid.gif" alt="data_invalid" /><!--{/if}-->
										<!--{/if}-->
									</td>
									<!--{/loop}-->
								</tr>
								<!--{/loop}-->
							</tbody>
						<!--{/if}-->

					</table>
					<!--{/loop}-->
				</div>
			</div>

			<script type="text/javascript">
				var tabObj = {'c1': 'member', 'c2': 'special', 'c3': 'specialadmin', 'c4': 'system'};
				var tba = $('tba').getElementsByTagName('li');
				for(var i=0; i<tba.length; i++){
					tba[i].onclick = function(){
						activeTab(this.id);
					}
				}
				
				function activeTab(id) {
					for(var key in tabObj) {
						if($(tabObj[key]) != null) {
							$(tabObj[key]).style.display = 'none';
						}
					}
					$(id).parentNode.className = 'tb ' + id;
					if($(tabObj[id]) != null) {
						$(tabObj[id]).style.display = '';
					}
				}
				var tbd = document.getElementsByTagName('tbody');
				function toggleTbody(cls){
					for(var i=0; i<tbd.length; i++){
						if(tbd[i].className == cls){
							tbd[i].style.display = tbd[i].style.display == 'none' ? '':'none';
						}
					}
				}
				function toggleTitle(obj){
					obj.className == 'oa' ? obj.className = 'ob' : obj.className = 'oa';
				}
				<!--{if $_G['gp_tab']}-->
				activeTab("$_G[gp_tab]");
				<!--{/if}-->
			</script>
		</div>
	</div>
</div>
<!--{/if}-->
<!--{template common/footer}-->
